/*
自己选择的路 ,跪着也要走完。朋友们 , 虽然这个世界日益浮躁起来,只
要能够为了当时纯粹的梦想和感动坚持努力下去 , 不管其它人怎么样,我
们也能够保持自己的本色走下去。
To the world , you will be a person , but to a person , you
will be the world .                               ——AKPower
*/
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string>
#include <stack>
#include <set>
#define IOS ios::sync_with_stdio(false), cin.tie(0)
using namespace std;
typedef long long ll;
const ll maxn = 1e5 + 100;
struct node
{
    double x, y;
} p[maxn];
ll n;
ll st[maxn];
ll tp;
bool used[maxn];
bool cmp(node a, node b)
{
    if (a.x == b.x)
        return a.y < b.y;
    return a.x < b.x;
}

double multi(double x1, double y1, double x2, double y2)
{
    return x1 * y2 - x2 * y1;
}

int main()
{
    IOS;
    cin >> n;
    for (ll i = 1; i <= n; i++)
    {
        cin >> p[i].x >> p[i].y;
    }
    sort(p + 1, p + 1 + n, cmp);
    tp = 0;
    st[++tp] = 1;
    for (ll i = 2; i <= n; i++)
    {
        while (tp >= 2 && multi(p[st[tp]].x - p[st[tp - 1]].x,
                                p[st[tp]].y - p[st[tp - 1]].y, p[i].x - p[st[tp]].x, p[i].y - p[st[tp]].y) <= 0.0)
            used[st[tp--]] = false;
        used[i] = true;
        st[++tp] = i;
    }
    ll tmp = tp;
    for (ll i = n - 1; i; i--)
    {
        if (used[i])
            continue;
        while (tp > tmp && multi(p[st[tp]].x - p[st[tp - 1]].x,
                                 p[st[tp]].y - p[st[tp - 1]].y, p[i].x - p[st[tp]].x, p[i].y - p[st[tp]].y) <= 0.0)
            used[st[tp--]] = false;
        used[i] = true;
        st[++tp] = i;
    }
    double ans = 0.0;
    for (ll i = 1; i < tp; i++)
    {
        node vec;
        vec.x = p[st[i + 1]].x - p[st[i]].x;
        vec.y = p[st[i + 1]].y - p[st[i]].y;
        ans += sqrt(vec.x * vec.x + vec.y * vec.y);
    }
    printf("%.2f\n", ans);
    getchar();
    getchar();
    return 0;
}
